package com.atguigu.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: cloud2020
 * @description: 自定义规则
 * @author: ZhaoYe
 * @create: 2021-07-30 14:25
 **/
@Configuration
public class MyselfRule {

    @Bean
    public IRule myRule(){
        //定义为随机
        return new RandomRule();
    }
}